// [DELETE 旧流程]
import React, { useState, useEffect, Fragment } from 'react';
import { Card, Button, Form, Modal, message, Table, Tag } from 'antd';
import { history } from 'umi';
import { formatMessage } from 'umi';
import { get as _get } from 'object-path';
import moment from 'moment';
import xss from 'xss';
import cn from 'classnames';
import PageHeaderWrapper from '@/components/PageHeaderWrapper';
import FlowStep from '@/components/Step';
import { FormContainer } from '@/components/UserForm/FormContainer';
import request from '@/utils/request';
import { getDuration, hideSalaryTable } from '@/utils/utils';
import { canclemyprocess } from '@/services/flowMine/myapplication';
import { withRoutePage } from '@/utils/enhanceUtils';
import PageRouter from '@/components/PageRouter/PageRouter';
import TableDiff from '@/components/Custom/TableDiff';
import PostTableDiff from '@/components/Custom/PostTableDiff';
import SalaryRefTable from '@/components/SalaryRefTable';
import { getBase, getContent } from '../WaitApproval/gradeFormItem';
import { SalaryHelper } from '../../components';
import styles from './Detail.less';

const { confirm } = Modal;

const initDetail = {
    formValueJson: {},
    workflowFile: [],
    offerFile: []
};

const formItemLayout = {
    labelCol: { span: 4 },
    wrapperCol: { span: 18 }
};

// const getPersonMsg = users => {
//     if (!users) return '';
//     const usersArr = users ? users.split(',') : [];
//     return usersArr.length > 1
//         ? `${usersArr.join('、')}等${usersArr.length}人`
//         : usersArr;
// };

const noValue = value => {
    let isNoValue = false;

    if (value === '') {
        isNoValue = true;
    }
    if (Array.isArray(value)) {
        const result = value.filter(item => item !== '[]' && item);
        if (result.length === 0) {
            isNoValue = true;
        }
    }

    return isNoValue;
};

const getStatus = detail => {
    const { status, candidateUsers } = detail;

    if (status === 2) {
        return `等待${candidateUsers}审批`;
    }
    if (status === 3) {
        return `申请被${candidateUsers}拒绝`;
    }
    if (status === 5) {
        return '已撤销';
    }
    if (status === 4) {
        return '审批通过';
    }
    if (status === 6) {
        return `申请被${candidateUsers}退回`;
    }
    return '';
};

const ApplyDetail = ({ location }) => {
    const {
        query: { applicationNo }
    } = location;
    const currentUser = localStorage.getItem('user') ? JSON.parse(localStorage.getItem('user')) : {};
    // 表单
    const [detail = {}, setDetail] = useState(initDetail);
    const { offerFile = [], workflowFile = [], officeFile = [], officeResFile = [] } = detail;
    console.info('officeFile:', officeFile);
    // 打卡记录list
    const [attenddetail, setAttenddetail] = useState({});
    // 请假类型
    // const [typeList, setTypeList] = useState([]);
    const { formValueJson: formValue } = detail;
    const [signDate, setSignDate] = useState(''); // 打卡时间
    const [modalvisible, setModalvisible] = useState(false); // 模态框展示
    // 日期格式(单位：leaveUnit)，请假申请
    const { formatTime } = formValue;
    // 流程
    const [process, setProcess] = useState([]);
    // 薪资参考用以显示特殊的card title
    const [salaryStandardName, setSalaryStandardName] = useState('');
    // 撤销申请
    const handleCancel = async () => {
        confirm({
            okText: '确定',
            cancelText: '取消',
            title: '确定要撤销申请吗？',
            onOk: async () => {
                const result = await canclemyprocess(detail.applicationName, applicationNo, detail.processInstanceId);

                if (result.code === 10000) {
                    message.success('撤销成功！');
                    history.push({
                        pathname: '/personal/portal/flow/mine/myApplication'
                    });
                } else {
                    message.error(result.msg);
                }
            },
            onCancel() {}
        });
    };
    // 重新编辑
    const handleReEdit = () => {
        let extraQuery = {};
        // 注意：薪资导入特殊逻辑
        if (detail.formKey === 'editSalary' || detail.formKey === 'positionMapping') {
            extraQuery = { ftype: formValue[0].value['表单类型'] };
        }

        history.push({
            pathname: '/personal/portal/flow/mine/list/apply',
            query: {
                applicationNo: detail.applicationNo,
                formDeploymentId: detail.formDeploymentId,
                id: detail.id,
                processDeploymentId: detail.processDeploymentId,
                templateId: detail.templateId,
                templateName: detail.templateName,
                // 代表重新编辑
                reedit: true,
                ...extraQuery
            }
        });
    };
    // 打卡记录列表
    const columnsModal = [
        {
            title: '工号',
            dataIndex: 'userNo',
            key: 'userNo'
        },
        {
            title: '姓名',
            dataIndex: 'employeeName',
            key: 'employeeName'
        },
        {
            title: '部门',
            dataIndex: 'departmentName',
            key: 'departmentName'
        },
        {
            title: '打卡时间',
            dataIndex: 'attDatetime',
            key: 'attDatetime'
        },
        {
            title: '考勤来源',
            dataIndex: 'deviceName',
            key: 'deviceName'
        }
    ];
    // 查看打卡记录
    const clockDetail = () => {
        // const user = JSON.parse(localStorage.getItem('user'));
        const searchTime = _get(detail, 'formValueJson.补卡时间', '');
        const parame = {
            employeeCode: _get(detail, 'employeeCode', ''),
            startTime: moment(searchTime).format('YYYY-MM-DD'),
            endTime: moment(searchTime).format('YYYY-MM-DD'),
            current: 1,
            pageSize: 50
        };
        request('/api/work/v1/attendance/signdetail', {
            method: 'POST',
            data: parame
        }).then(result => {
            if (result.code === 10000) {
                setAttenddetail(result.data.rows);
                setSignDate(moment(searchTime).format('YYYY-MM-DD'));
                setModalvisible(true);
            }
        });
        // setModalvisible(true);
        // dispatch({
        //     type: 'approvalDetail/getAttendancedetail',
        //     payload: {
        //         ...parame
        //     }
        // }).then(() => {
        //     setSignDate('');
        //     setModalvisible(true);
        // });
    };
    const getExtra = () => {
        // const find = [...process].reverse().find(item => item.status);
        // 审批中可以撤销
        if (detail.status === 2) {
            return (
                <Button type="primary" onClick={handleCancel}>
                    撤销
                </Button>
            );
        }
        // 已退回
        if (detail.status === 6) {
            return (
                <Fragment>
                    <Button style={{ marginLeft: 8 }} type="primary" onClick={handleCancel}>
                        撤销
                    </Button>
                    <Button style={{ marginLeft: 8 }} type="primary" onClick={handleReEdit}>
                        重新编辑
                    </Button>
                </Fragment>
            );
        }
        return null;
    };
    const renderImages = (files, width, height) =>
        files.length > 0 &&
        files.map(item => (
            <div key={item.id}>
                <img src={item.url} alt={item.originName} width={width} height={height} />
                <p>{item.originName}</p>
            </div>
        ));

    const setFormItem = (newFormValue, all, isCustomStyle) => {
        // 是否自定义formItem样式
        let customLayOut = {};
        if (isCustomStyle) {
            customLayOut = {
                labelCol: { span: 6 },
                wrapperCol: { span: 18 }
            };
        }

        let candicateIndex = 0;

        Object.keys(newFormValue).forEach(prop => {
            // 非必填且没有值的就不显示
            if (noValue(newFormValue[prop])) return null;
            if (prop === '时长' || prop === 'duration') {
                if (formatTime) {
                    all.push(
                        <Form.Item key={prop} label={prop} {...customLayOut}>
                            {getDuration(Number(newFormValue[prop]), Number(formatTime) || 3)}
                        </Form.Item>
                    );
                } else {
                    all.push(
                        <Form.Item key={prop} label={prop} {...customLayOut}>
                            {getDuration(Number(newFormValue[prop]), 3)}
                        </Form.Item>
                    );
                }
            } else if (prop === '与候选人关系') {
                if (candicateIndex === 0) {
                    all.push(
                        <Form.Item key={prop} label={prop} {...customLayOut}>
                            {newFormValue[prop] && newFormValue[prop][0]}
                        </Form.Item>
                    );
                    candicateIndex += 1;
                } else if (candicateIndex === 1) {
                    all.push(
                        <Form.Item key={prop} label={prop} {...customLayOut}>
                            {newFormValue[prop] && newFormValue[prop][1]}
                        </Form.Item>
                    );
                }
            } else if (prop === '附件' || prop === 'talentName' || prop === '新闻列表图片' || prop === '推荐新闻图片') {
                // console.info(1);
                // return null;
            } else if (prop === 'formatTime') {
                // 这个字段不做渲染，只得到单位
                // return null;
            } else if (prop === '涨幅') {
                all.push(
                    <Form.Item key={prop} label={prop} {...customLayOut}>
                        {newFormValue[prop]}%
                    </Form.Item>
                );
            } else if (prop === '年薪涨幅') {
                all.push(
                    <Form.Item key={prop} label={prop} {...customLayOut}>
                        {newFormValue[prop]}%
                    </Form.Item>
                );
            } else if (newFormValue[prop] === 'true') {
                all.push(
                    <Form.Item key={prop} label={prop} {...customLayOut}>
                        是
                    </Form.Item>
                );
            } else if (newFormValue[prop] === 'false') {
                all.push(
                    <Form.Item key={prop} label={prop} {...customLayOut}>
                        否
                    </Form.Item>
                );
            } else if (prop === 'null') {
                // return null;
            } else if (prop === '补卡时间') {
                all.push(
                    <Form.Item key={prop} label={prop} style={{ marginBottom: 0 }} {...customLayOut}>
                        {newFormValue[prop]}
                        <a style={{ marginLeft: '10px' }} onClick={() => clockDetail()}>
                            查看打卡记录
                        </a>
                    </Form.Item>
                );
            } else if (prop === '需求部门' || prop === '录用部门' || prop === '籍贯') {
                all.push(
                    <Form.Item key={prop} label={prop} {...customLayOut}>
                        {JSON.parse(newFormValue[prop]).join('/')}
                    </Form.Item>
                );
            } else if (prop === '期望到岗时间') {
                all.push(
                    <Form.Item key={prop} label={prop} {...customLayOut}>
                        {newFormValue[prop].join(' 到 ')}
                    </Form.Item>
                );
            } else if (prop === '薪资范围') {
                all.push(
                    <Form.Item key={prop} label={prop} {...customLayOut}>
                        {newFormValue[prop][0] && `${newFormValue[prop][0]}K/月`}
                        {newFormValue[prop][1] && ` - ${newFormValue[prop][1]}K/月`}
                        {newFormValue[prop][2] && ` x ${newFormValue[prop][2]}月`}
                    </Form.Item>
                );
            } else if (prop === '语言能力') {
                all.push(
                    <Form.Item key={prop} label={prop} {...customLayOut}>
                        {newFormValue[prop][0] && `${JSON.parse(newFormValue[prop][0]).join(' , ')}`}
                        {newFormValue[prop][1] && `(${newFormValue[prop][1]})`}
                    </Form.Item>
                );
            } else if (Array.isArray(newFormValue[prop])) {
                if (prop === '实施范围') {
                    all.push(
                        <Form.Item key={prop} label={prop} {...customLayOut}>
                            {newFormValue[prop][0]}
                        </Form.Item>
                    );
                } else if (prop === '发布类型') {
                    if (newFormValue[prop][1] === '') {
                        all.push(
                            <Form.Item key={prop} label={prop} {...customLayOut}>
                                {newFormValue[prop][0]}
                            </Form.Item>
                        );
                    } else {
                        all.push(
                            <Form.Item key={prop} label={prop} {...customLayOut}>
                                {newFormValue[prop][0]}-{newFormValue[prop][1]}
                            </Form.Item>
                        );
                    }
                } else if (prop === '生效日期') {
                    if (newFormValue[prop][1] === '') {
                        all.push(
                            <Form.Item key={prop} label={prop} {...customLayOut}>
                                {newFormValue[prop]
                                    .map(item => (Array.isArray(item) ? item.join('-') : item))
                                    .filter(item => !!item)
                                    .join('-')}
                            </Form.Item>
                        );
                    } else {
                        all.push(
                            <Form.Item key={prop} label={prop} {...customLayOut}>
                                {moment(newFormValue[prop][1]).format('YYYY-MM-DD')} 至{' '}
                                {moment(newFormValue[prop][2]).format('YYYY-MM-DD')}
                            </Form.Item>
                        );
                    }
                } else {
                    all.push(
                        <Form.Item key={prop} label={prop} {...customLayOut}>
                            {newFormValue[prop]
                                .map(item => (Array.isArray(item) ? item.join('-') : item))
                                .filter(item => !!item)
                                .join('-')}
                        </Form.Item>
                    );
                }
            } else if (
                prop === '职位工作内容' ||
                prop === '其他要求' ||
                prop === '试用期标准' ||
                prop === '人力资源总监意见' ||
                prop === '增补原因' ||
                prop === '总经理意见' ||
                prop === '直属上级评价' ||
                prop === '同级评价' ||
                prop === '下属评价' ||
                prop === '背调对象1' ||
                prop === '背调对象2'
            ) {
                all.push(
                    <Form.Item
                        key={prop}
                        label={prop}
                        {...customLayOut}
                        vvspan={24}
                        labelCol={{ span: 3 }}
                        wrapperCol={{ span: 21 }}
                    >
                        <pre className={styles.pre}>{newFormValue[prop]}</pre>
                    </Form.Item>
                );
            } else if (prop === '新闻内容(中文)' || prop === '新闻内容(英文)') {
                all.push(
                    <Form.Item
                        key={prop}
                        label={prop}
                        {...customLayOut}
                        vvspan={24}
                        labelCol={{ span: 3 }}
                        wrapperCol={{ span: 21 }}
                    >
                        <span
                            style={{ wordBreak: 'break-all' }}
                            // eslint-disable-next-line react/no-danger
                            dangerouslySetInnerHTML={{
                                __html: xss(newFormValue[prop])
                            }}
                        />
                    </Form.Item>
                );
            } else if (prop === '新闻标签(中文)' || prop === '新闻标签(英文)') {
                all.push(
                    <Form.Item
                        key={prop}
                        label={prop}
                        {...customLayOut}
                        vvspan={24}
                        labelCol={{ span: 3 }}
                        wrapperCol={{ span: 21 }}
                    >
                        {newFormValue[prop] &&
                            JSON.parse(newFormValue[prop]).map(item => <Tag key={item.key}>{item.value}</Tag>)}
                    </Form.Item>
                );
            } else if (prop === '创建时间') {
                all.push(
                    <Form.Item key={prop} label={prop} {...customLayOut}>
                        {newFormValue[prop]}
                    </Form.Item>
                );
                if (officeFile.length > 0) {
                    all.push(
                        <Form.Item label="推荐新闻图片" vvspan={24} labelCol={{ span: 3 }} wrapperCol={{ span: 21 }}>
                            {renderImages(officeFile, 50, 50)}
                        </Form.Item>
                    );
                }
                if (officeResFile.length > 0) {
                    all.push(
                        <Form.Item label="新闻列表图片" vvspan={24} labelCol={{ span: 3 }} wrapperCol={{ span: 21 }}>
                            {renderImages(officeResFile, 100, 50)}
                        </Form.Item>
                    );
                }
            } else if (prop === '制度关键词') {
                all.push(
                    <Form.Item key={prop} label={prop} vvspan={24} labelCol={{ span: 3 }} wrapperCol={{ span: 18 }}>
                        {JSON.parse(newFormValue[prop]).map(item => (
                            <Tag key={item.key}>{item.value}</Tag>
                        ))}
                    </Form.Item>
                );
            } else if (prop === '制度简介') {
                all.push(
                    <Form.Item key={prop} label={prop} vvspan={24} labelCol={{ span: 3 }} wrapperCol={{ span: 18 }}>
                        {newFormValue[prop]}
                    </Form.Item>
                );
            } else if (prop === '制度文件') {
                // 制度文件因为发起流程做必填，但是详情页又不显示，所以这边判断进行为空
                all.push(null);
            } else if (prop === '申请理由说明') {
                all.push(
                    <Form.Item key={prop} label={prop} vvspan={24} labelCol={{ span: 3 }} wrapperCol={{ span: 18 }}>
                        {newFormValue[prop]}
                    </Form.Item>
                );
            } else {
                all.push(
                    <Form.Item key={prop} label={prop} {...customLayOut}>
                        {newFormValue[prop]}
                    </Form.Item>
                );
            }
            return null;
        });
    };

    const getFormItem = () => {
        // 判断是否是数组，如果是数组表示有小标题
        const all = [];
        // ------------------------------------------------------------------------------- 职级相关逻辑开始
        const specialRule = [
            'addGradeType',
            'addGrade',
            'editGrade',
            'editGradeType',
            'modifyGrade',
            'modifyGradeType',
            'deleteGrade',
            'deleteGradeType'
        ].includes(detail.formKey);
        if (specialRule) {
            if (!Array.isArray(formValue)) {
                return null;
            }
            const [base, content] = formValue;
            return [...getBase(base, detail.formKey), ...getContent(content, detail.formKey)];
        }
        // ------------------------------------------------------------------------------- 职级相关逻辑结束

        // ------------------------------------------------------------------------------- 薪资相关逻辑开始
        if (detail.formKey === 'editSalary' || detail.formKey === 'positionMapping') {
            const Component = detail.formKey === 'editSalary' ? TableDiff : PostTableDiff;
            const salaryProps = detail.formKey === 'editSalary' ? { setSalaryStandardName } : {};

            const content = (
                <Form.Item label="修改内容" labelCol={{ span: 3 }} wrapperCol={{ span: 18 }}>
                    <Component
                        {...salaryProps}
                        value={formValue[0].value['修改内容']}
                        type={formValue[0].value['表单类型']}
                    />
                </Form.Item>
            );
            const reason = (
                <Form.Item label="修改理由" labelCol={{ span: 3 }} wrapperCol={{ span: 18 }}>
                    {formValue[0].value['修改理由']}
                </Form.Item>
            );
            return [content, reason];
        }
        // ------------------------------------------------------------------------------- 薪资相关逻辑开始

        if (Array.isArray(formValue)) {
            formValue.forEach(item => {
                const allItem = [];
                // 如果地下都没有值，则不显示标题
                const result = Object.keys(item.value).filter(prop => !noValue(item.value[prop]));
                if (result.length !== 0) {
                    setFormItem(item.value, allItem, true);
                    all.push(<h4 className={styles.formSubTitle}>{item.title}</h4>);
                    all.push(<FormContainer>{allItem}</FormContainer>);
                    if (item.title === '薪资福利' && !hideSalaryTable) {
                        const { entryPost } = JSON.parse(detail.formValueJsonApp);
                        all.push(
                            <Form.Item
                                label="薪资参考"
                                labelCol={{ md: { span: 3 } }}
                                wrapperCol={{ md: { span: 20 } }}
                            >
                                <SalaryRefTable postId={entryPost} companyId={currentUser.companyId} />
                            </Form.Item>
                        );
                    }
                }
            });
        } else {
            setFormItem(formValue, all, false);
        }

        return all;
    };

    useEffect(() => {
        const fetchDetail = async () => {
            const result = await request(
                `/api/oa/v1/workflow/myprocess/getmyprocessdetail?applicationNo=${applicationNo}`,
                {
                    method: 'POST'
                }
            );

            if (result.code === 10000) {
                setDetail(result.data);
                setProcess(result.data?.processValueJson || []);
            }
            if (result && result.code === 30021) {
                message.error(result.msg);
            }
            if (result && result.code === 20010) {
                message.error(result.msg);
            }
        };
        if (applicationNo) {
            fetchDetail();
        }
    }, [applicationNo]);
    const isArray = Array.isArray(formValue);
    const renderFiles = files =>
        files.length > 0 &&
        files.map(item => (
            <div key={item.id}>
                {item.originName}
                <a rel="noopener noreferrer" target="_blank" style={{ marginLeft: 8 }} href={item.url} download>
                    下载
                </a>
            </div>
        ));
    // 根据文件名返回格式，比如a.pdf 返回pdf
    const getFileType = name => name.split('.')[1].toLowerCase();
    const renderIframe = file => {
        if (file.length > 0) {
            // 将s3替换成oss
            const docUrl = encodeURIComponent(file[0].url);
            const url = `https://view.officeapps.live.com/op/view.aspx?src=${docUrl}`;

            return file[0].url ? (
                <FormContainer>
                    <Form.Item label="制度文件" vvspan={24} labelCol={{ span: 3 }} wrapperCol={{ span: 18 }}>
                        <b style={{ color: '#000' }}>{file[0].originName}</b>
                        <div className={cn(styles.textWrap, styles[getFileType(file[0].originName)])}>
                            <div className={styles.maskTop}>
                                <i className={styles.logo} />
                                微微科技内部文件，仅供查看
                            </div>
                            <div className={styles.maskBottom} />
                            <iframe
                                title="制度文件"
                                style={{
                                    width: '100%',
                                    height: '600px',
                                    border: 0
                                }}
                                src={url}
                            ></iframe>
                        </div>
                    </Form.Item>
                </FormContainer>
            ) : (
                ''
            );
        }
        return '';
    };
    const renderHelper = () => {
        console.log('===============================================>detail.formKey', detail.formKey);
        if (detail.formKey === 'editSalary' || detail.formKey === 'positionMapping') {
            return <SalaryHelper formKey={detail.formKey} type={formValue[0].value['表单类型']} />;
        }
        return null;
    };
    const renderCommonItem = () => {
        if (isArray) {
            return (
                <FormContainer>
                    <Form.Item label="申请编号" labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
                        {detail.applicationNo || ''}
                    </Form.Item>
                    <Form.Item label="所在部门" labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
                        {detail.department || ''}
                    </Form.Item>
                </FormContainer>
            );
        }
        return (
            <Fragment>
                <Form.Item label="申请编号">{detail.applicationNo || ''}</Form.Item>
                <Form.Item label="所在部门">{detail.department || ''}</Form.Item>
            </Fragment>
        );
    };
    return (
        <PageHeaderWrapper type="success">
            <PageRouter type="myflow" activePath="/personal/portal/flow/mine/myApplication">
                <Form className={styles.detailForm} {...formItemLayout}>
                    {Object.keys(detail.formValueJson).length === 0 ? null : (
                        <Fragment>
                            <Card
                                bordered={false}
                                className={styles.noBorderBottom}
                                title={
                                    <span>
                                        {salaryStandardName + detail.applicationName}
                                        <h6 className={styles.subTitle}>（{getStatus(detail)}）</h6>
                                    </span>
                                }
                                extra={getExtra()}
                            >
                                {renderHelper()}
                                {detail.formKey === 'institutionRelease' ? '' : renderCommonItem()}
                                {getFormItem()}
                                {detail.formKey === 'institutionRelease'
                                    ? renderIframe(detail.institutionFile)
                                    : (offerFile.length > 0 || workflowFile.length > 0) &&
                                      (isArray ? (
                                          <FormContainer>
                                              <Form.Item label="附件" labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
                                                  {renderFiles((offerFile.length > 0 && offerFile) || workflowFile)}
                                              </Form.Item>
                                          </FormContainer>
                                      ) : (
                                          <Fragment>
                                              <Form.Item label="附件">
                                                  {renderFiles((offerFile.length > 0 && offerFile) || workflowFile)}
                                              </Form.Item>
                                          </Fragment>
                                      ))}
                            </Card>
                            <Card bordered={false} className={styles.subCard} title="审批进度">
                                <Form.Item wrapperCol={{ offset: 3 }}>
                                    <FlowStep data={process} />
                                </Form.Item>
                            </Card>
                        </Fragment>
                    )}
                </Form>
                <Modal
                    title={
                        <div>
                            <div style={{ fontSize: '20px', color: '#333' }}>
                                {formatMessage({
                                    id: 'stat.ckdkjl'
                                })}
                            </div>
                            <p
                                style={{
                                    color: 'rgba(0, 0, 0, .45)',
                                    fontSize: '14px',
                                    marginBottom: 0
                                }}
                            >
                                {signDate}
                                {formatMessage({
                                    id: 'stat.dksj'
                                })}
                            </p>
                        </div>
                    }
                    width={600}
                    footer={null}
                    visible={modalvisible}
                    onOk={() => {
                        setModalvisible(false);
                        setSignDate('');
                    }}
                    onCancel={() => {
                        setModalvisible(false);
                        setSignDate('');
                    }}
                    centered
                >
                    <Table dataSource={attenddetail} columns={columnsModal} pagination={false} rowKey="id" />
                </Modal>
            </PageRouter>
        </PageHeaderWrapper>
    );
};

ApplyDetail.propTypes = {};

export default withRoutePage(ApplyDetail);
